﻿#pragma once
#include "discrete_face_utils.hxx"
#include "acis/sphere.hxx"

class sphere_faceter : abstract_faceter {
private:
    sphere* localSphere = nullptr;
    std::vector<std::vector<std::tuple<int, point, point>>> loop_cross_pairs;

protected:
    void init() override;
    void decideUVlen() override;
    bool getLoops() override { return false; }
    void peripheryProcess() override { return; }
    bool USeperationProcess() override { return false; }
    bool VSeperationProcess() override { return false; }
    void holeProcess() override { return; }
    void attachMesh() override;

public:
    sphere_faceter(FACE* f, double nt = 0, double st = 0) : abstract_faceter(f, nt, st) {}
    outcome facet() override;
};

outcome facet_face_sphere(FACE* f, double nt = 0, double st = 0);
/**
 * 此文件保存离散化球面的函数.
 */
outcome facet_face_sphere_old(FACE* f, double nt = 0, double st = 0);
